﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Text;

namespace Dzzzr.DataLayer
{
	public class PersonProvider
	{
		public static IDataReader GetPersonList(int teamID)
		{
			return Helper.DB.ExecuteReader("GetPersonList", teamID);
		}
		public static IDataReader GetPersonByID(int personID)
		{
			return Helper.DB.ExecuteReader("GetPersonByID", personID);
		}
		public static void InsertPerson(int id, string name, string description, int maxSendingPause, string fullName, DateTime? birthDate, string teamPhone, string otherPhones, string icq, string skype, string otherIMs, string radio, string tracker, string otherDevices)
		{
			Helper.DB.ExecuteNonQuery("InsertPerson", id, name, description, maxSendingPause, fullName, birthDate, teamPhone, otherPhones, icq, skype, otherIMs, radio, tracker, otherDevices);
		}
		public static void UpdatePerson(int id, string name, string description,  int maxSendingPause, string fullName, DateTime? birthDate, string teamPhone, string otherPhones, string icq, string skype, string otherIMs, string radio, string tracker, string otherDevices)
		{
			Helper.DB.ExecuteNonQuery("UpdatePerson", id, name, description, maxSendingPause, fullName, birthDate, teamPhone, otherPhones, icq, skype, otherIMs, radio, tracker, otherDevices);
		}
		public static void DeletePerson(int personID)
		{
			Helper.DB.ExecuteNonQuery("DeletePerson", personID);
		}


	}
}
